package com.sky.mapper;

import com.sky.annotation.AutoFill;
import com.sky.entity.DishFlavor;
import com.sky.enumeration.OperationType;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @program: sky-take-out
 * @description:
 * @author: 酷炫焦少
 * @create: 2024-11-17 11:04
 **/
@Mapper
public interface DishFlavorMapper {


    int saveDishFlavors(@Param("dishId") Long dishId, @Param("flavors") List<DishFlavor> flavors);

    @AutoFill(OperationType.UPDATE)
    int updateDishFlavors(List<DishFlavor> flavors);

    void deleteDishFlavorsByDishId(List<Long> dishIds);

}
